---
- name: ensure packages required for taskotron-frontend are installed (yum)
  package: name={{ item }} state=present enablerepo={{ extra_enablerepos }}
  with_items:
    - httpd
  when: ansible_distribution_major_version|int < 22

- name: ensure packages required for taskotron-frontend are installed (dnf)
  dnf: name={{ item }} state=present enablerepo={{ extra_enablerepos }}
  with_items:
    - httpd
  when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined

- name: create dirs for static files
  file: path=/var/www/html/{{ item }} state=directory owner=apache group=apache mode=1755
  with_items:
    - 'static/'
    - 'static/img'
    - 'static/css'
    - 'static/fonts'

- name: copy static bits
  copy: src=static/ dest=/var/www/html/static owner=apache group=apache mode=0644

#- name: copy fonts
  #copy: src={{ bigfiles }}/fonts dest=/var/www/html/static/ owner=apache group=apache mode=0644

- name: generate landing page
  template: src=landingpage.html.j2 dest=/var/www/html/index.html owner=apache group=apache mode=0644

